package com.turing.post.thirdinterface.util;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.IdClass;
import javax.persistence.Table;

/**
 * 卡种类对照表
 * 
 * @author kangzhe
 * 
 */
@SuppressWarnings("serial")
@Entity
@Table(name = "MapMchTradDetail")
@IdClass(MapMchTradDetail.class)
public class MapMchTradDetail implements Serializable {

	private String MerchantNo;
	private Date TranDate;
	private String ReqSeqNo;

	public MapMchTradDetail() {

	}

	@Id
	@Column(name = "MerchantNo")
	public String getMerchantNo() {
		return MerchantNo;
	}

	public void setMerchantNo(String merchantNo) {
		MerchantNo = merchantNo;
	}

	@Id
	@Column(name = "TranDate")
	public Date getTranDate() {
		return TranDate;
	}

	public void setTranDate(Date tranDate) {
		TranDate = tranDate;
	}

	@Id
	@Column(name = "ReqSeqNo")
	public String getReqSeqNo() {
		return ReqSeqNo;
	}

	public void setReqSeqNo(String reqSeqNo) {
		ReqSeqNo = reqSeqNo;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((getMerchantNo() == null) ? 0 : getMerchantNo().hashCode());
		result = prime * result
				+ ((getReqSeqNo() == null) ? 0 : getReqSeqNo().hashCode());
		result = prime * result
				+ ((getTranDate() == null) ? 0 : getTranDate().hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		final MapMchTradDetail other = (MapMchTradDetail) obj;
		if (getMerchantNo() == null) {
			if (other.getMerchantNo() != null)
				return false;
		} else if (!getMerchantNo().equals(other.getMerchantNo()))
			return false;
		if (getReqSeqNo() == null) {
			if (other.getReqSeqNo() != null)
				return false;
		} else if (!getReqSeqNo().equals(other.getReqSeqNo()))
			return false;
		if (getTranDate() == null) {
			if (other.getTranDate() != null)
				return false;
		} else if (!getTranDate().equals(other.getTranDate()))
			return false;
		return true;
	}

}
